﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace com.ReinforceLab.AlphaRexNxtStep
{
    class WeightTextConverter : System.Windows.Data.IValueConverter
    {
        #region IValueConverter メンバ
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (null == value) return "null";
            if (value is float)
            {
                float val = (float)value;
                return val.ToString("00.00");
            }
            if (value is double)
            {
                double val = (double)value;
                return val.ToString("00.00");
            }
            return "type?";            
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return null;            
        }
        #endregion
    }
}
